//
//  ShareCellCostum.m
//  MMLOOK
//
//  Created by dllo on 15/9/1.
//  Copyright (c) 2015年 武俊娥. All rights reserved.
//

#import "ShareCellCostum.h"
#import "UIImageView+WebCache.h"

@interface ShareCellCostum ()

@property (nonatomic, retain)UIImageView *imageView;

@end

@implementation ShareCellCostum

- (void)dealloc
{
    [_imageView release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self creatSubView];
    }
    return self;
}

- (void)creatSubView
{
    self.imageView = [[UIImageView alloc] init];
    [self.contentView addSubview:_imageView];
    [_imageView release];
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    [super applyLayoutAttributes:layoutAttributes];
    
    _imageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}

- (void)sendDic: (NSMutableDictionary *)dic
{
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:[dic objectForKey:@"pic"]]placeholderImage:[UIImage imageNamed:@"home.jpg"]];
}

@end
